home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Enlighten DSM 1.1
/
SGI EnlightenDSM 1.1.iso
/
aix41
/
emd.z
/
emd
/
bin
/
show_enl_daemons
< prev
next >
Wrap
Text File
|
1998-06-30
|
1KB
|
64 lines
#!/bin/sh
#
# Script: show_enl_daemons
#
# show_enl_daemons shows Enlighten daemons that are running and their PIDs.
# (md, pep, renld, and Events)
#
# Copyright (c) 1990-1998 Enlighten Software Solutions, Inc.
# All Rights Reserved.
#
# (ksh was used to bypass a variable bug in SCO3's sh. This script
# is /bin/sh compatible.)
#
SHUTDOWN_SECS=10
PATH=/bin:/usr/bin:/etc:/usr/ucb:/usr/bsd:/usr/etc:$PATH
export PATH
appName=`basename $0`
errorCheck () {
if [ $? -ne 0 ] ; then
echo "$appName: Fatal: Could not stop Enlighten daemons." 1>&2
exit 1
fi
}
OS=`uname -s`
REV=`uname -r`
#
# Deal with bsd ps
#
OPTS="-e"
PIDCOLUMN=1
if [ "$OS" = "SunOS" ]; then
case "$REV" in
4.1.* )
OPTS="-gxww"
PIDCOLUMN=1
;;
esac
fi
PIDS=`ps $OPTS | egrep -e 'emdd|pep|AgentMon|AgentENL|emdd|renld' | grep -v egrep`
if [ -z "$PIDS" ] ; then
echo
echo "No Enlighten daemons are running."
echo
else
echo
echo "The following Enlighten daemons are running:"
echo
ps $OPTS | grep PID | grep -v grep
echo "$PIDS"
echo
fi
exit 0